<template>
	<view class="AnnouncementDetail">
		<view class="line"></view>
		<view class="title">
			{{detailData.title || ""}}
		</view>

		<view class="Sub-label">
			<view class="Sub-label_item">
				时间：{{detailData.createTime || ""}}
			</view>
			<view class="Sub-label_item Sub-label_itemd">
				发布人：{{detailData.createBy || ""}}
			</view>
		</view>
		<view class="line lines"></view>
		<view class="content">
			<u-parse :content="detailData.content "></u-parse>
		</view>


	</view>
</template>

<script>
	import {
		viewAnnouncement
	} from "@/api/api.js"
	export default {
		data() {
			return {
				id: "",
				detailData: {},
			}
		},
		onLoad(options) {
			// console.log("options", options)
			this.id = options.id
			this.handleGetviewAnnouncement()
		},
		methods: {
			async handleGetviewAnnouncement() {
				let res = await viewAnnouncement({
					id: this.id
				})
				if (res.code == 200) {
					this.detailData = res.data
				}
			},
		}
	}
</script>

<style scoped lang="scss">
	.AnnouncementDetail {
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;

		.line {
			width: 100%;
			height: 1rpx;
			background: rgba(0, 0, 0, 0.1);
		}

		.lines {
			width: 716rpx;
			margin: 16rpx auto;
		}

		.title {
			font-weight: 600;
			font-size: 40rpx;
			color: #333333;
			line-height: 56rpx;
			margin-top: 40rpx;
		}

		.Sub-label {
			display: flex;
			align-items: center;

			.Sub-label_item {
				font-weight: 500;
				font-size: 24rpx;
				color: #333333;
				margin-top: 32rpx;
			}

			.Sub-label_itemd {
				margin-left: 100rpx;
			}
		}

		.content {
			width: 100%;
			padding: 20rpx;
			box-sizing: border-box;
		}


	}
</style>